Skip to content

London | 26-SDC-Mar | Mariia Serhiienko | Sprint 4 |Implement shell tools python#529

Open
Konvaly wants to merge 5 commits into
CodeYourFuture:mainfrom
Konvaly:implement-shell-tools-python
Open

London | 26-SDC-Mar | Mariia Serhiienko | Sprint 4 |Implement shell tools python#529
Konvaly wants to merge 5 commits into
CodeYourFuture:mainfrom
Konvaly:implement-shell-tools-python

Conversation

@Konvaly
Copy link
Copy Markdown

@Konvaly Konvaly commented May 28, 2026

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Implemented shell tools in Python:

  • cat — print file contents with -n and -b flags
  • ls — list directory contents with -1 and -a flags
  • wc — count lines, words and characters with -l, -w, -c flags

@Konvaly Konvaly added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 28, 2026
Copy link
Copy Markdown
Contributor

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start, but some minor things to rework with your argument handling

)

parser.add_argument(
"-1",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any difference between when -1 is used and when it is not?

print(f"{lines:>{width_lines}} {path}")
elif args.w:
print(f"{words:>{width_words}} {path}")
elif args.c:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to combine these, say if I wanted words and chars, but not lines?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants